<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<title><?php echo ($name); ?></title>
<script src="__APP__/statics/jquery-1.9.1.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__APP__/statics/css/jNotify.jquery.css" />
<script type="text/javascript" src="__APP__/statics/jNotify.jquery.js"></script>
<style>
 body{font-family:"微软雅黑";font-size:12px;color:#666666;background-color:#F9F9F6}
 *{margin: 0;} 
 a{text-decoration:none}
 img{border:0px}
.cat{background-color:#F9F9F6;margin-left:10px;z-index:0;}
.cat_list:hover{background-color:#fff;}
.title{background:url("__APP__/statics/tbg.gif");font-weight:bold}

#save{text-align:center;border:0;width:100%;height:40px;background-color:#fff;position:fixed;left:0px;bottom:0px;z-index:999;border:1px solid #DFDFDF;background-color:#DFDFDF;padding:5px;height:20px}
</style>
<body>
<style>
input{padding:6px;}
.title{background:#E2E8EB;width:180px;text-align:right;}
</style>
<table border="0" width="700px" align="center" cellspacing="3" cellpadding="3">
	<tr>
		<td class="title">SMTP服务器：</td>
		<td><input type="text" name="smtp_name" size="20" value="<?php echo ($smtp_name); ?>">如:smtp.qq.com、smtp.163.com</td>
	</tr>
	<tr>
		<td class="title">SMTP服务器端口：</td>
		<td><input type="text" name="smtp_port" size="20" value="<?php echo ($smtp_port); ?>">一般为25</td>
	</tr>
	<tr>
		<td class="title">SMTP服务器用户名：</td>
		<td><input type="text" name="user" size="20" value="<?php echo ($user); ?>">一般同下面email</td>
	</tr>
	<tr>
		<td class="title">发件人EMAIL：</td>
		<td><input type="text" name="from_email" size="20" value="<?php echo ($from_email); ?>"></td>
	</tr>
	<tr>
		<td class="title">发件人EMAIL密码：</td>
		<td><input type="text" name="pwd" size="20" value="<?php echo ($pwd); ?>"></td>
	</tr>
	<tr>
		<td class="title">发件人名称：</td>
		<td><input type="text" name="from_name" size="20" value="<?php echo ($from_name); ?>">此名称将显示为发件人名称</td>
	</tr>
</table>


<div id="save"><input type="button" id="change" value="保存修改" style="padding:2px"></div>

<script>
$("#change").click(function(){
   var smtp_name=$("[name=smtp_name]").val();
   var smtp_port=$("[name=smtp_port]").val();
   var user=$("[name=user]").val();
   var from_email=$("[name=from_email]").val();
   var pwd=$("[name=pwd]").val();
   var from_name=$("[name=from_name]").val();
   
   $.ajax({
        type:"POST",
		url:"__URL__/email_sys_save",
		dataType:"json",
		data:{"smtp_name":smtp_name,"smtp_port":smtp_port,"user":user,"from_email":from_email,"pwd":pwd,"from_name":from_name},
		success:function(data){
		    jSuccess("<strong>修改成功！</strong>",{TimeShown : 500,VerticalPosition : 'center',HorizontalPosition : 'center',onClosed:function(){location.reload();}})
       }
   })
})


</script>